*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	overflow-y: auto;

	height: 100%;

	&.noscroll {
		overflow: hidden;
	}
}

body {
	position: relative;

	display: flex;

	overflow: visible;

	flex-direction: column;

	width: 100%;
	height: 100%;
	padding: 0;

	background-color: var(--rc-color-primary);

	font-family: var(--body-font-family);
	font-size: var(--text-small-size);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

@media (width <= 500px) {
	body {
		position: fixed;
	}
}

:focus {
	outline: 0 !important;
	outline-style: none;
	outline-color: transparent;
}

.clearfix {
	clear: both;

	&::after {
		display: table;
		clear: both;

		content: "";
	}
}

a {
	cursor: pointer;
	text-decoration: none;

	&:hover,
	&:active {
		text-decoration: none;
	}
}

button {
	padding: 0;

	cursor: pointer;
	text-align: left;
	text-transform: inherit;

	color: inherit;
	border-width: 0;
	background: none;

	font-style: inherit;
}

#rocket-chat {
	position: relative;

	display: flex;

	overflow: hidden;

	flex: 1 1 auto;

	height: 100%;

	max-height: 100%;

	align-items: stretch;

	&.animated-hidden {
		visibility: hidden;

		opacity: 0;
	}
}

.rc-icon {
	overflow: hidden;

	width: 1.25em;
	height: 1em;

	vertical-align: -0.15em;
	fill: currentColor;

	&--default-size {
		font-size: 20px;
	}
}

.ps-scrollbar-y-rail {
	background: transparent !important;
}

.ps-scrollbar-y {
	width: 4px !important;
}

.first-unread .body {
	&::before {
		position: absolute;
		z-index: 1;
		top: 0;
		left: 0;

		width: 100%;
		height: 1px;

		content: "";

		animation-name: unread;
		animation-duration: 0.2s;

		pointer-events: none;

		background: var(--rc-color-error);
	}

	&::after {
		position: absolute;
		z-index: 1;
		top: -6px;
		right: 0;

		padding: 0 5px;
		padding-bottom: 2px;

		content: attr(data-unread-text);

		animation-name: unread;
		animation-duration: 0.2s;
		text-align: right;
		text-transform: lowercase;

		pointer-events: none;

		color: var(--rc-color-error);

		border-radius: 2px;
		background: #ffffff;

		font-size: 10px;

		line-height: 10px;
	}
}

@keyframes unread {
	from {
		opacity: 0;
	}

	to {
		opacity: 100%;
	}
}

.message.new-day.first-unread {
	&::after {
		border-color: var(--rc-color-error);
	}

	& .body {
		&::before {
			display: none;
		}

		&::after {
			top: -26px;
		}
	}
}

.hidden {
	display: none;
}

@media print {
	#rocket-chat.menu-nav,
	.simplebar-content-wrapper,
	section.rcx-box.rcx-box--full,
	.rc-old.main-content {
		overflow: visible !important; /* 1 */

		height: auto !important; /* 1 */
		max-height: none !important; /* 1 */
		flex-shrink: 0 !important; /* 1 */
	}

	div.simplebar-offset,
	.simplebar-mask,
	.rc-old .messages-container .wrapper {
		position: relative !important; /* 1 */
	}

	.simplebar-placeholder {
		height: 0 !important; /* 1 */
	}

	body {
		height: auto !important; /* 1 */
	}

	.rc-old .room-container,
	.rc-old .room-container:first-child,
	.rc-old .messages-container-main,
	.rc-old .messages-container-wrapper,
	.rc-old .main-content-flex {
		flex: 1 0 auto !important; /* 1 */

		height: auto !important; /* 1 */
	}

	.rc-alerts {
		display: none !important; /* 1 */
	}

	.rcx-box.rcx-box--full {
		overflow: visible !important /* 1 */;

		height: auto !important /* 1 */;
	}

	.rc-scrollbars-container {
		overflow: visible !important; /* 1 */

		height: auto !important; /* 1 */
	}

	.rc-scrollbars-view {
		position: relative !important; /* 1 */
	}
}

.gallery-item {
	cursor: pointer;
}

/*
 1. The `!important` directive is necessary to override components' autogenerated styles.
 */
